﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Entity
{
    public class Category
    {
        /// <summary>
        /// 分类ID（⾃增主键）
        /// </summary>
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 分类名称（如"⼿机数码"）
        /// </summary>
        
        [Required]
        [StringLength(32)]
        public string? Name { get; set; }
    }
}
